home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / listings / v_13_04 / allison / convert2.c < prev    next >
C/C++ Source or Header  |  1995-02-06  |  303b  |  26 lines

  1. LISTING 2 - Illustrates automatic conversion via function
  2. prototypes
  3.  
  4. /* convert2.c */
  5. #include <stdio.h>
  6.  
  7. void dprint(double);
  8.  
  9. main()
  10. {
  11.     dprint(123);
  12.     dprint(123.0);
  13.     return 0;
  14. }
  15.  
  16. void dprint(double d)
  17. {
  18.     printf("%f\n",d);
  19. }
  20.  
  21. /* Output:
  22. 123.000000
  23. 123.000000
  24. */
  25.  
  26.